home *** CD-ROM | disk | FTP | other *** search
- /*
- File: errno.h
-
- Contains: Error reporting macros
-
- Version: Technology: StdCLib 3.4
- Release: 3.6d2
-
- Copyright: © 1987-1996 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __ERRNO__
- #define __ERRNO__
-
- #ifndef __CONDITIONALMACROS__
- #include <ConditionalMacros.h>
- #endif
-
-
- #if PRAGMA_ONCE_SUPPORTED
- #pragma once
- #endif /* PRAGMA_ONCE_SUPPORTED */
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #elif PRAGMA_PACK_SUPPORTED
- #pragma pack(push, 2)
- #endif
-
-
-
- /* ANSI specified declarations */
-
- #define EDOM 33 /* Argument outside function domain */
- #define ERANGE 34 /* Result is too large to represent */
-
- /* ****************** errno begin **************************** */
-
- #if ( defined( USE_MP ) || defined( _POSIX_THREAD_SAFE_FUNCTIONS ) ) \
- && ( defined( __powerc ) || defined( powerc ) )
-
- extern int* __geterrno( void );
- /* __geterrno is an MP-safe accessor for errno */
-
- #define errno (*__geterrno())
-
- #else
-
- extern int errno;
-
- #endif
-
- /* **************** errno end ********************************* */
-
- /* Mac specific declaration */
-
- extern short MacOSErr;
-
- /* Non-ANSI macro definitions */
-
- #define EPERM 1 /* Operation not permitted */
- #define ENOENT 2 /* No such file or directory */
- #define ENORSRC 3 /* No such process */
- #define EINTR 4 /* Interrupted function call */
- #define EIO 5 /* Input/Output error */
- #define ENXIO 6 /* No such device or address */
- #define E2BIG 7 /* Argument list too long */
- #define ENOEXEC 8 /* File not in executable format */
- #define EBADF 9 /* Bad file descriptor (or number) */
- #define ECHILD 10 /* No child process */
- #define EAGAIN 11 /* Resource temporarily unavailable */
- #define ENOMEM 12 /* Not enough space */
- #define EACCES 13 /* File access permission denied */
- #define EFAULT 14 /* Bad address as argument in call */
- #define ENOTBLK 15 /* For backward compatibility */
- #define EBUSY 16 /* System resource busy */
- #define EEXIST 17 /* File already exists */
- #define EXDEV 18 /* Improper link attempted */
- #define ENODEV 19 /* No such device */
- #define ENOTDIR 20 /* Pathname was not a directory */
- #define EISDIR 21 /* Attempt to open directory for write */
- #define EINVAL 22 /* Invalid argument */
- #define ENFILE 23 /* Too many open files in system */
- #define EMFILE 24 /* Too many open files in process */
- #define ENOTTY 25 /* Inappropriate I/O control operation */
- #define ETXTBSY 26 /* Text file is busy */
- #define EFBIG 27 /* File too large */
- #define ENOSPC 28 /* No space left on device */
- #define ESPIPE 29 /* Invalid seek */
- #define EROFS 30 /* Attempt to modify a read-only file */
- #define EMLINK 31 /* Too many links on a single file */
- #define EPIPE 32 /* Broken pipe; no process to read it */
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #elif PRAGMA_PACK_SUPPORTED
- #pragma pack(pop)
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __ERRNO__ */
-
-